<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="utf-8">
        <title>
            小程序商城管理平台
        </title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="../css/x-admin.css" media="all">
    </head>
    <style>
        .black_overlay{
            display: none;
            position: absolute;
            top: 0%;
            left: 0%;
            width: 100%;
            height: 100%;
            background-color: black;
            z-index:1001;
            -moz-opacity: 0.8;
            opacity:.80;
            filter: alpha(opacity=88);
        }
        .white_content {
            display: none;
            position: absolute;
            top: 25%;
            left: 25%;
            width: 35%;
            height: 45%;
            padding: 20px;
            border: 8px solid orange;
            background-color: white;
            z-index:1002;
            overflow: auto;
        }
        #light{
            line-height: 50px;

        }
    </style>
    <body>
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header header header-demo">
            <div class="layui-main">
                <a class="logo" href="index.html">
                    一站式商城管理平台
                </a>
                <ul class="layui-nav" lay-filter="">
                    <li class="layui-nav-item"><img src="../images/logo.png" class="layui-circle" style="border: 2px solid #A9B7B7;" width="35px" alt=""></li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">admin</a>
                        <dl class="layui-nav-child"> <!-- 二级菜单 -->
                            <dd><a href="">个人中心</a></dd>
                            <dd><a href="../logout">退出</a></dd>
                        </dl>
                    </li>
                    <!-- <li class="layui-nav-item">
                      <a href="" title="消息">
                          <i class="layui-icon" style="top: 1px;">&#xe63a;</i>
                      </a>
                      </li> -->
                    <li class="layui-nav-item x-index"><a th:href="@{'../index'}">首页</a></li>
                </ul>
            </div>
        </div>
        <div class="layui-side layui-bg-black x-side">
            <div class="layui-side-scroll">
                <ul class="layui-nav layui-nav-tree site-demo-nav" lay-filter="side">
                    <li class="layui-nav-item">
                        <a class="javascript:;" href="javascript:;">
                            <i class="layui-icon" style="top: 3px;">&#xe607;</i><cite>会员管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../user/toUserList'}">
                                    <cite>用户列表</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../user/toAdminList'}">
                                    <cite>管理员管理</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../user/toRoleList'}">
                                    <cite>角色管理</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../user/toNoteList'}">
                                    <cite>短信管理</cite>
                                </a>
                            </dd>
                            </dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a class="javascript:;" href="javascript:;">
                            <i class="layui-icon" style="top: 3px;">&#xe62d;</i><cite>商品管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../commodity/toCommodityList'}">
                                    <cite>商品列表</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../commodity/toClassifyList'}">
                                    <cite>商品分类</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../commodity/toTradeTrademarkList'}">
                                    <cite>品牌列表</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../commodity/toMoldList'}">
                                    <cite>商品类型</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../commodity/toParameterList'}">
                                    <cite>商品属性</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../commodity/toPropertyList'}">
                                    <cite>参数列表</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../commodity/toEvaluateList'}">
                                    <cite>商品评价</cite>
                                </a>
                            </dd>
                            </dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a class="javascript:;" href="javascript:;">
                            <i class="layui-icon" style="top: 3px;">&#xe634;</i><cite>订单管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../order/orderlist'}">
                                    <cite>订单列表</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../invoice/invoicelist'}">
                                    <cite>发货单列表</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../billoflading/BillListAll'}">
                                    <cite>提货单列表</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../aftersale/aftersalelist'}">
                                    <cite>售后单列表</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../return/returnlist'}">
                                    <cite>退货单列表</cite>
                                </a>
                            </dd>
                            </dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a class="javascript:;" href="javascript:;">
                            <i class="layui-icon" style="top: 3px;">&#xe642;</i><cite>运营管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../Article/Articlelist'}">
                                    <cite>文章列表</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../notice/noticelist'}">
                                    <cite>公告列表</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../ArticleType/ArticleTypelist'}">
                                    <cite>文章分类</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../Advertising/Advertisinglist'}">
                                    <cite>广告列表</cite>
                                </a>
                            </dd>
                            </dd>
                            <dd class="">
                            <dd class="">
                                <a th:href="@{'../Advertisingspace/Advertisingspacelist'}">
                                    <cite>广告位列表</cite>
                                </a>
                            </dd>
                            </dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a class="javascript:;" href="javascript:;">
                            <i class="layui-icon" style="top: 3px;">&#xe630;</i><cite>促销管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd class="">
                                <a th:href="@{'../promotion/seckillList'}">
                                    <cite>团购秒杀列表</cite>
                                </a>
                            </dd>
                            <dd class="">
                                <a th:href="@{'../coupon/couponList'}">
                                    <cite>优惠券列表</cite>
                                </a>
                            </dd>
                            <dd class="">
                                <a th:href="@{'../sales/salesList'}">
                                    <cite>促销列表</cite>
                                </a>
                            </dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a class="javascript:;" href="javascript:;">
                            <i class="layui-icon" style="top: 3px;">&#xe606;</i><cite>财务管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd class="">
                                <a th:href="@{'../paylist'}">
                                    <cite>支付单列表</cite>
                                </a>
                            </dd>
                            <dd class="">
                                <a th:href="@{'../withdlist'}">
                                    <cite>提现列表</cite>
                                </a>
                            </dd>
                            <dd class="">
                                <a th:href="@{'../metlist'}">
                                    <cite>支付方式列表</cite>
                                </a>
                            </dd>
                            <dd class="">
                                <a th:href="@{'../retlist'}">
                                    <cite>退款单列表</cite>
                                </a>
                            </dd>
                            <dd class="">
                                <a th:href="@{'../acclist'}">
                                    <cite>账户资金管理</cite>
                                </a>
                            </dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a class="javascript:;" href="javascript:;">
                            <i class="layui-icon" style="top: 3px;">&#xe612;</i><cite>控制面板</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd class="">
                                <a th:href="@{'../explist'}">
                                    <cite>导入导出</cite>
                                </a>
                            </dd>
                            <dd class="">
                                <a th:href="@{'../piclist'}">
                                    <cite>图片列表</cite>
                                </a>
                            </dd>
                            <dd class="">
                                <a th:href="@{'../stolist'}">
                                    <cite>门店列表</cite>
                                </a>
                            </dd>
                            <dd class="">
                                <a th:href="@{'../log/loglist'}">
                                    <cite>操作日志</cite>
                                </a>
                            </dd>
                            <dd class="">
                                <a th:href="@{'../logisticsCompany/getLogistics'}">
                                    <cite>物流公司列表</cite>
                                </a>
                            </dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a class="javascript:;" href="javascript:;">
                            <i class="layui-icon" style="top: 3px;">&#xe613;</i><cite>微信管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd class="">
                                <a th:href="@{'../official/getOfficial'}">
                                    <cite>公众号配置</cite>
                                </a>
                            </dd>
                            <dd class="">
                                <a th:href="@{'../official/getApplet'}">
                                    <cite>小程序配置</cite>
                                </a>
                            </dd>
                        </dl>
                    </li>
                </ul>
                </div>

            </div>
            <div class="layui-tab layui-tab-card site-demo-title x-main" lay-filter="x-tab" lay-allowclose="true">
                <div class="x-slide_left"></div>
                <ul class="layui-tab-title">
                    <li class="layui-this">
                        我的桌面
                        <i class="layui-icon layui-unselect layui-tab-close">ဆ</i>
                    </li>
                </ul>

                <div style="padding: 15px;">
            <span class="layui-breadcrumb" style="visibility: visible;">
                <i class="iconfont icon-shouyeshouye"></i>
                                        <a href="/manage/index/index.html">管理后台</a><span lay-separator="">/</span>
                                            <a href="/manage/notice/index.html">运营管理</a><span lay-separator="">/</span>
                                            <a><cite>广告位列表</cite></a>
                                </span>

                    <form class="layui-form seller-form" action="">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label seller-inline-2">名称：</label>
                                <div class="layui-input-inline seller-inline-4">
                                    <input type="text" th:value="${name}" name="name" placeholder="请输入广告位名称关键字" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label seller-inline-2">更新时间：</label>
                                <div class="layui-input-inline seller-inline-4">
                                    <input type="date" th:value="${utime}" id="utime" name="utime" autocomplete="off" class="layui-input" lay-key="2">
                                </div>
                            </div>

                            <div class="layui-inline">
                                <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="advertPosition-search" type="submit"><i class="iconfont icon-chaxun"></i>筛选</button>
                                <button type="button" class="layui-btn layui-btn-sm add-advertPosition" href = "JavaScript:void(0)" onclick = "openDialog(this)"><i class="layui-icon"></i> 添加</button>
                            </div>

                        </div>
                    </form>

                    <div class="table-body">
                        <table class="layui-table layui-form">
                            <thead>
                            <tr>
                                <th>
                                </th>
                                <th>广告位名称</th>
                                <th>广告位模板编码</th>
                                <th>创建时间</th>
                                <th>更新时间</th>
                                <th>排序</th>
                                <th>操作</th>
                            </thead>
                            <tbody>
                            <tr th:each="lists:${advertisingspaceList}">
                                <td th:text="${listsStat.count}"></td>
                                <td th:text="${lists.aspace}"></td>
                                <td th:text="${lists.modelCode}"></td>
                                <td th:text="${lists.createDate}"></td>
                                <td th:text="${lists.updDate}"></td>
                                <td th:text="${lists.sort}"></td>
                                <td class="td-manage">
                                    <a title="编辑" class="layui-btn layui-btn-sm" th:href="@{'selspace?id='+${lists.id}}">编辑</a>
                                    <a title="删除" class="layui-btn layui-btn-sm" th:id="${lists.id}" onclick="del(this)">删除</a>
                                </td>
                            </tr>
                            <tr>
                                <td th:colspan="7" style="text-align: center">
                            <span th:if="${page.pageno>1}">
                                <a class="layui-btn layui-btn-sm" th:href="@{'Advertisingspacelist?pageno='+1}">首页</a><a class="layui-btn layui-btn-sm" th:href="@{'Advertisingspacelist?pageno='+${page.pageno-1}}">上一页</a>
                            </span>
                                    <span th:if="${page.pageno<page.pagetotalcount}">
                                 <a class="layui-btn layui-btn-sm" th:href="@{'Advertisingspacelist?pageno='+${page.pageno+1}}">下一页</a><a class="layui-btn layui-btn-sm" th:href="@{'Advertisingspacelist?pageno='+${page.pagetotalcount}}">尾页</a>
                             </span>&nbsp;&nbsp;&nbsp;&nbsp;
                                    <span style="font-size: 17px">第<span th:text="${page.pageno}"></span>页/共<span th:text="${page.pagetotalcount}"></span>页</span>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

            </div>
            <div class="site-mobile-shade">
            </div>
        </div>
        <script src="../lib/layui/layui.js" charset="utf-8"></script>
        <script src="../js/x-admin.js"></script>
        <script>
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
          var s = document.getElementsByTagName("script")[0];
          s.parentNode.insertBefore(hm, s);
        })();
        </script>



        <div id="light" class="white_content" style="width: 400px;">
            <form action="addspace">
                <div style="margin-left: 70px">
                广告位名称:&nbsp;&nbsp;<input type="text" name="aspace" required style="height: 30px;width: 170px" placeholder="请输入广告位名称"><br>
                状态:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name="aCode" style="height: 30px;width: 170px" >
                <option th:each="codes:${advertisingcodes}" th:value="${codes.id}"><span th:text="${codes.modelName}"></span></option>
            </select><br/>
                排序:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input required type="text" name="sort" style="height: 30px;width: 170px" placeholder="数值越小排名越靠前"><br/>
                </div>
                <button class="layui-btn layui-btn-fluid" type="submit">确定</button><br>
                <div style="text-align: center">
                    <a href = "javascript:void(0)" onclick = "closeDialog()">点这里关闭本窗口</a>
                </div>
            </form>
        </div>
        <div id="fade" class="black_overlay"></div>

    <script type="text/javascript">
        function del(obj){
            var id=$(obj).attr("id");
            if(confirm("确定删除吗？")){
                $.get("delspace","id="+id,function (data) {
                    if(data.delspace=="yes") {
                        alert("删除成功!");
                        location.href = "Advertisingspacelist";
                        return true;
                    }else{
                        alert("删除失败");
                    }
                })
            }else{
                alert("您已取消了删除操作");
                return false;
            }
        }

        $(function(){
        });
        function openDialog(obj){
            document.getElementById('light').style.display='block';
            document.getElementById('fade').style.display='block'
        }
        function closeDialog(){
            document.getElementById('light').style.display='none';
            document.getElementById('fade').style.display='none'
        }
    </script>
    </body>
</html>
